package com.fita.entity.dto.ehi.response;

import java.math.BigDecimal;
import java.math.RoundingMode;

/**
 * 单个价格显示
 *
 * @description:
 * @author: 11200
 * @date: 2019/7/12
 */
public class Price {

    // 价格符号
    private String currencySymbol;

    // 货币描述
    private String description;

    private BigDecimal price;

    public Price(String currencySymbol, String description, BigDecimal price) {
        this.currencySymbol = currencySymbol;
        this.description = description;
        this.price = price;
    }

    /**
     * 拼接显示
     * @return
     */
    public String getPrettyPrice(){
        return description + ": " + currencySymbol + " " + price.setScale(2 , RoundingMode.HALF_UP);
    }

    public String getCurrencySymbol() {
        return currencySymbol;
    }

    public void setCurrencySymbol(String currencySymbol) {
        this.currencySymbol = currencySymbol;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }
}
